/*     */ package com.qmsk.business.member.memberLevel.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.basic.MapUtils;
/*     */ import com.utils.gson.in.GsonHeadOneRow;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class MemberLevelDAO extends SupportDAO
/*     */ {
/*     */   public GsonEbRst getGsonOfShopId(Integer shopId, Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/*  37 */     Map params = new HashMap();
/*  38 */     MapUtils.addToMap(params, "shopId", shopId);
/*  39 */     return getGsonOfParams("selectSqlOfShopId", params, nPageIdx, 
/*  40 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfShopIdSys(Long shopId) throws SQLException {
/*  44 */     Map params = new HashMap();
/*  45 */     MapUtils.addToMap(params, "shopId", shopId);
/*  46 */     MapUtils.addToMap(params, "sys", Integer.valueOf(1));
/*  47 */     return getGsonOfParams("selectSqlOfShopId", params, Integer.valueOf(0), Short.valueOf((short) 1), true); }
/*     */ 
/*     */   public GsonHeadOneRow getGsonOfLevelId(Long Levelid) throws SQLException {
/*  50 */     Map params = new HashMap();
/*  51 */     MapUtils.addToMap(params, "LevelID", Levelid);
/*  52 */     MapUtils.addToMap(params, "Status", "正常");
/*  53 */     return getOneRowOfParams("selectSqlOfShopId", params);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfNormal(Integer shopId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  58 */     Map params = new HashMap();
/*  59 */     MapUtils.addToMap(params, "shopId", shopId);
/*  60 */     return getGsonOfParams("selectSqlOfNormal", params, nPageIdx, 
/*  61 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfNormal(Integer shopId) throws SQLException {
/*  65 */     Map params = new HashMap();
/*  66 */     MapUtils.addToMap(params, "shopId", shopId);
/*  67 */     return getGsonOfParams("selectSqlOfNormal", params, false);
/*     */   }
/*     */ 
/*     */   public int getValidDay(Long shopId, Object levelID) throws SQLException {
/*  71 */     Map params = new HashMap();
/*  72 */     MapUtils.addToMap(params, "shopId", shopId);
/*  73 */     MapUtils.addToMap(params, "levelId", levelID);
/*  74 */     return queryForInt("selectSqlValidDay", params, Integer.valueOf(0)).intValue();
/*     */   }
/*     */ 
/*     */   public GsonEbRst getSys(Long levelId, Boolean isDefault) throws SQLException
/*     */   {
/*  79 */     Map params = new HashMap();
/*  80 */     MapUtils.addToMap(params, "levelId", levelId);
/*  81 */     if (isDefault != null) {
/*  82 */       if (isDefault.booleanValue())
/*  83 */         MapUtils.addToMap(params, "sys", Integer.valueOf(1));
/*     */       else {
/*  85 */         MapUtils.addToMap(params, "sys", Integer.valueOf(0));
/*     */       }
/*     */     }
/*  88 */     return getGsonOfParams("selectShopIdSqlOfLevelIDAndSys", params, false);
/*     */   }
/*     */ 
/*     */   public int updateSysValueOfShopId(Long shopId) throws SQLException {
/*  92 */     Map params = new HashMap();
/*  93 */     MapUtils.addToMap(params, "shopId", shopId);
/*  94 */     return update("updateSysOfShopId", params);
/*     */   }
/*     */ 
/*     */   public Double getDisCountOfLevelId(Long levelId, Long shopId) throws SQLException {
/*  98 */     Map params = new HashMap();
/*  99 */     MapUtils.addToMap(params, "shopId", shopId);
/* 100 */     MapUtils.addToMap(params, "levelId", levelId);
/* 101 */     return queryForDouble("getDisCountOfLevelId", params, Double.valueOf(0.0D));
/*     */   }
/*     */ 
/*     */   public GsonEbRst getWxGsonOfShopId(Integer shopId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/* 106 */     Map params = new HashMap();
/* 107 */     MapUtils.addToMap(params, "shopId", shopId);
/* 108 */     return getGsonOfParams("selectSqlWxOfShopId", params, nPageIdx, 
/* 109 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public Long getIsMemberZd(Long shopId) throws SQLException {
/* 113 */     Map params = new HashMap();
/* 114 */     params.put("shopId", shopId);
/* 115 */     return queryForLong("selectSqlIsMemberZd", params, Long.valueOf(0L));
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.memberLevel.dao.MemberLevelDAO
 * JD-Core Version:    0.5.3
 */